package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.domain.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper extends BaseMapper<UserInfo> {

    @Select("select u.* FROM tb_user_info u join tb_black_list b ON  b.black_user_id = u.id WHERE b.user_id = #{userId}")
    IPage<UserInfo> getPage(@Param("pageInfo") Page pageInfo, @Param("userId") Long userId);
}
